<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>添加新闻</title>
    <link href="/newxcx/Application/Admin/View//Public/static/css/bootstrap.css" rel="stylesheet">

    <link href="/newxcx/Application/Admin/View//Public/static/css/sb-admin.css" rel="stylesheet">
    <link rel="stylesheet" href="/newxcx/Application/Admin/View//Public/static/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="/newxcx/Application/Admin/View//Public/static/css/style.css">
</head>

<body>

<div id="wrapper">
    <!-- Sidebar -->
    <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <span style="line-height:50px;background:#dc3545;padding:5px 10px;color:white;"><a href="/" target=_blank style="color:white;font-size:12px;"><i class="fa fa-home"></i> 网站首页</a> </span>
           <span style="line-height:50px;background:#dc3545;padding:5px 10px;color:white;margin-left:10px;"><a href='javascript:clear_cache()' style="color:white;font-size:12px;"><i class="fa fa-trash"></i>  清空缓存</a>
            <a class="navbar-brand" href="<?php echo U('index/index');?>">系统管理后台</a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse navbar-ex1-collapse">

            <ul class="nav navbar-nav side-nav">
    <li class="dropdown"><a href="<?php echo U('index/index');?>"><i class="fa fa-dashboard"></i> 系统信息</a></li>
    <li class="dropdown"><a href="<?php echo U('news/index');?>"><i class="fa fa-edit"></i> 新闻管理</a></li>
    <li class="dropdown"><a href="<?php echo U('product/index');?>"><i class="fa fa-edit"></i> 产品管理</a></li>
    <li class="dropdown"><a href="<?php echo U('banner/index');?>"><i class="fa fa-edit"></i> 图片轮播</a></li>
    <li class="dropdown"><a href="<?php echo U('Contact/index');?>"><i class="fa fa-edit"></i> 联系我们</a></li>
    <li class="dropdown"><a href="<?php echo U('Tar/index');?>"><i class="fa fa-edit"></i> 导航栏目</a></li>
    <!--<li><a href="<?php echo U('index/index');?>"><i class="fa fa-dashboard"></i> 系统信息</a></li>-->
    <!--<li class="dropdown">-->
        <!--<a href="<?php echo U('Category/index');?>"><i class="fa fa-reorder"></i> 分类管理</a>-->
    <!--</li>-->
    <!--<li class="dropdown">-->
        <!--<a href="<?php echo U('Article/index');?>"><i class="fa fa-edit"></i> 文章管理</a>-->
    <!--</li>-->
    <!--<li class="dropdown">-->
        <!--<a href="<?php echo U('Page/index');?>"><i class="fa fa-file-text-o"></i> 单页管理 </a>-->
    <!--</li>-->

    <!--<li class="dropdown">-->
        <!--<a href="<?php echo U('Member/index');?>"><i class="fa fa-users"></i> 用户管理</a>-->
    <!--</li>-->
    <!--<li class="dropdown">-->
        <!--<a href="<?php echo U('Withdraw/index');?>"><i class="fa fa-money"></i> 提现申请 </a>-->
    <!--</li>-->
    <!--<li class="dropdown
    ">-->
        <!--<a href="<?php echo U('Paylog/index');?>"><i class="fa fa-credit-card"></i> 支付记录 </a>-->
    <!--</li>-->
     <!--<li class="dropdown">-->
        <!--<a href="<?php echo U('Links/index');?>"><i class="fa fa-link"></i> 链接管理</a>-->
    <!--</li>-->
    <!--<li class="dropdown">-->
        <!--<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-cog"></i> 系统设置 <b class="caret"></b></a>-->
        <!--<ul class="dropdown-menu">-->
            <!--<li><a href="<?php echo U('Setting/index');?>">自定义字段</a></li>-->
            <!--<li><a href="<?php echo U('Baksql/index');?>">数据备份</a></li>-->
        <!--</ul>-->
    <!--</li>-->
</ul>


            <ul class="nav navbar-nav navbar-right navbar-user">
                <li class="dropdown user-dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-user"></i> 你好,<?php echo session('username');?> <b class="caret"></b></a>
                    <ul class="dropdown-menu">
                        <li><a href="/admin.php?m=Admin&c=member&a=update&id=<?php echo session('adminId');?>"><i class="fa fa-gear"></i> 设置</a></li>
                        
                        <li class="divider"></li>
                        <li><a href="<?php echo U('login/logout');?>"><i class="fa fa-power-off"></i> 退出</a></li>
                    </ul>
                </li>
            </ul>
        </div><!-- /.navbar-collapse -->
    </nav>
    
    <script>
       function clear_cache(){
           $.ajax({
              url:'<?php echo U("index/clear_cache");?>',
              success:function(data){
                 if(data == 1){
                    alert('清理成功!');
                 }else{
                    alert('清理失败，请稍后重试!');
                 }
              }
           })
       }
    </script>
<div id="page-wrapper">
   <ol class="breadcrumb">
        <li class="breadcrumb-item">
          <a href="/admin.php">首页</a>
        </li>
        <li class="breadcrumb-item active"><a href='<?php echo U("news/index");?>'>新闻管理</a></li>
        <li class="breadcrumb-item active">添加新闻</li>
      </ol>
    <div class="row">
        <div class="col-lg-12">
            
        </div>
    </div>

    <form method="POST" name="addnews" action="<?php echo U('news/add');?>">
        <div class="form-group">
            <label for="article-title">新闻标题</label>
            <input type="text" name="title" class="form-control" id="article-title" placeholder="输入新闻标题">
        </div>
        <div class="form-group">
            <label for="article-title">新闻描述</label>
            <input type="text" name="description" class="form-control"  placeholder="输入新闻标题">
        </div>
        <div class="form-group">
            <label for="article-content">新闻内容</label>
            <script id="article-content" name="content" type="text/plain"></script>
        </div>
        <button type="submit" class="btn btn-default">提交</button>
        <button class="btn btn-success fileinput-button" type="button" id="upimg">上传封面图</button>
        <input type="file" id="thumb_img" name="thumb_img_post" style="display: none">
        <input type="hidden" value="" name="thumb_img" id="save_thumb_path">
    </form>
    <div id="show_img">

    </div>
</div>
<!-- 配置文件 -->
<script type="text/javascript" src="/newxcx/Public/ueditor/ueditor.config.js"></script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="/newxcx/Public/ueditor/ueditor.all.js"></script>
<!-- 实例化编辑器 -->
<script type="text/javascript">
    var ue = UE.getEditor('article-content',{
        toolbars: [
            ['fullscreen', 'source', 'undo', 'redo','bold', 'italic', 'underline','fontborder', 'strikethrough', '|','simpleupload', 'insertimage','attachment','emotion','link','unlink', '|', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote','searchreplace', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc'],
            ['inserttable','insertrow', 'insertcol','mergeright', 'mergedown','deleterow', 'deletecol','splittorows','splittocols', 'splittocells','deletecaption','inserttitle', 'mergecells', 'deletetable','insertparagraphbeforetable', 'paragraph','fontsize','fontfamily']
        ],
        initialFrameHeight:500,
        zIndex:100
    });
</script>
<!-- JavaScript -->
<script src="/newxcx/Application/Admin/View//Public/static/js/jquery-1.10.2.js"></script>
<script src="/newxcx/Application/Admin/View//Public/static/js/bootstrap.js"></script>
<script src="/newxcx/Application/Admin/View//Public/static/js/app.js"></script>
<script src="/newxcx/Application/Admin/View//Public/static/layer/layer.js"></script>

</body>
</html>
<script charset="utf-8" src="/newxcx/Public/js/upImg.js"></script>